/*
 * @Description:Shape测试
 * 
 * @Author: rendc
 * 
 * @Date: 2025-03-07 09:55:47
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-03-07 10:01:11
 */
public class ShapeTest {

  public static void main(String[] args) {
    // 1. 抽象类不能实例化对象
    // Shape s = new Shape();
    // Shape s1 = new Shape("形状");
    // 2. 子类对象可以指向抽象类的引用 多态
    Shape s2 = new Circle("形状", 2);
    // 3. 测试子类实现的方法
    double area = s2.getArea();
    System.out.println("area:" + area);
  }
}